<!DOCTYPE html>
<html>
<head>
<title>用户列表</title>
<#include "/header.html">
	<link rel="stylesheet" href="/plugins/layui/css/layui.css">

</head>
<body>

<div >
	<table lay-even lay-skin="line" lay-size="lg" class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
            <tr>
                <th >变动类型名称</th>
                <th >变动金额类型</th>
                <th >变动金额</th>
                <th >变动时间</th>
            </tr>
        </thead>
        <tbody id="divArticle">

        </tbody>
    </table>
</div>

<script src="/plugins/layui/layui.js"></script>
<script>
    var pageSize = 10;
    var pageIndex = 0;
    var userId = localStorage.getItem('userId');
    var accountTypeCode = localStorage.getItem('accountTypeCode');
    layui.use('flow', function () {
        var flow = layui.flow;
        flow.load({
            elem: '#divArticle' //指定列表容器
            ,done: function(pageIndex, next){ //到达临界点（默认滚动触发），触发下一页
                var lis = [];
                $.ajax({
					type: "POST",
					url: baseURL + '/users/user/accounts/'+accountTypeCode+'/seq',
					data: { page_size: pageSize, page_num: pageIndex, userId: userId },
					success: function (data) {
                        var infos = data.page.result;
                        layui.each(infos, function(index, item){
                            lis.push('<tr><td>'+item.changeTypeName+'</td>' +
                            '<td>'+item.seqFlagName+'</td>' +
                            '<td>'+item.changeAmount+'</td>' +
                            '<td>'+item.createTime+'</td></tr>');
                        });
						next(lis.join(''), pageIndex < data.page.totalPages);
                	}
           	 	});
			}
        });
    });
</script>

</body>
</html>